package list

type List interface {
	Size() int
	IsEmpty() bool
	Capacity() int

	Add(data interface{})
	AddIndex(index int, data interface{})

	Remove(data interface{})
	RemoveIndex(index int)

	Get(i int) interface{}
	IndexOf(i interface{}) int

	AddAll(list List)
	Clear()
}

type Node struct {
	data interface{}
	next *Node
}

type DoubleNode struct {
	data interface{}
	pre  *DoubleNode
	next *DoubleNode
}
